package org.apache.ibatis.demo.plugs;

import org.apache.ibatis.executor.resultset.ResultSetHandler;
import org.apache.ibatis.plugin.*;

import java.sql.Statement;
import java.util.Properties;

/**
 * 自定义结果处理器插件
 */
//@Intercepts({@Signature(type = ResultSetHandler.class,
//        method = "handleResultSets",
//        args = {Statement.class})})
public class UserResultSetHandlerPlugin implements Interceptor {
    private Properties properties = new Properties();

    @Override
    public Object intercept(Invocation invocation) throws Throwable {
        return invocation.proceed();
    }

    @Override
    public Object plugin(Object target) {
        return Plugin.wrap(target, this);
    }

    @Override
    public void setProperties(Properties properties) {
        this.properties = properties;
    }
}
